<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>libnetconf: With-defaults capability</title>

<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="../../cesnet-logo-125.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">libnetconf
   &#160;<span id="projectnumber">0.1.1</span>
   </div>
   <div id="projectbrief">NETCONF library</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0-20120409 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="../../modules.html"><span>Modules</span></a></li>
      <li><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('d1/df7/group__withdefaults.html','../../');
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">With-defaults capability</div>  </div>
</div><!--header-->
<div class="contents">

<p>libnetconf's implementation of NETCONF with-defaults capability as defined in RFC 6243.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga2f7ad46580c9d311a31ed090baa7e22e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/df7/group__withdefaults.html#ga2f7ad46580c9d311a31ed090baa7e22e">NCDFLT_DISABLE</a>&#160;&#160;&#160;<a class="el" href="../../d1/df7/group__withdefaults.html#ga09827f8096ddbf28bf4955254299cbed">ncdflt_set_basic_mode</a>(<a class="el" href="../../da/dbe/with__defaults_8h.html#ac70bef25cced39f6bab2ca5623ac57d9a0d81a2784281ceef0b6f2cef0dc7a41a">NCDFLT_MODE_DISABLED</a>)</td></tr>
<tr class="memdesc:ga2f7ad46580c9d311a31ed090baa7e22e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable support for with-defaults capability. This can be done on both client and server.  <a href="#ga2f7ad46580c9d311a31ed090baa7e22e"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga09827f8096ddbf28bf4955254299cbed"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/df7/group__withdefaults.html#ga09827f8096ddbf28bf4955254299cbed">ncdflt_set_basic_mode</a> (<a class="el" href="../../da/dbe/with__defaults_8h.html#ac70bef25cced39f6bab2ca5623ac57d9">NCDFLT_MODE</a> mode)</td></tr>
<tr class="memdesc:ga09827f8096ddbf28bf4955254299cbed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set basic mode of the with-defaults capability for the NETCONF server.  <a href="#ga09827f8096ddbf28bf4955254299cbed"></a><br/></td></tr>
<tr class="memitem:gaf5b02a59944cda3cc65859f67df4a0f6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../da/dbe/with__defaults_8h.html#ac70bef25cced39f6bab2ca5623ac57d9">NCDFLT_MODE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/df7/group__withdefaults.html#gaf5b02a59944cda3cc65859f67df4a0f6">ncdflt_get_basic_mode</a> ()</td></tr>
<tr class="memdesc:gaf5b02a59944cda3cc65859f67df4a0f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get current set basic mode of the with-defaults capability.  <a href="#gaf5b02a59944cda3cc65859f67df4a0f6"></a><br/></td></tr>
<tr class="memitem:gaef1d4d6cb1a0b212ffe88cca68e97a21"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/df7/group__withdefaults.html#gaef1d4d6cb1a0b212ffe88cca68e97a21">ncdflt_set_supported</a> (<a class="el" href="../../da/dbe/with__defaults_8h.html#ac70bef25cced39f6bab2ca5623ac57d9">NCDFLT_MODE</a> modes)</td></tr>
<tr class="memdesc:gaef1d4d6cb1a0b212ffe88cca68e97a21"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set with-defaults modes that are supported.  <a href="#gaef1d4d6cb1a0b212ffe88cca68e97a21"></a><br/></td></tr>
<tr class="memitem:gafb1af1e519d77c793af539d8d34c27ce"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../da/dbe/with__defaults_8h.html#ac70bef25cced39f6bab2ca5623ac57d9">NCDFLT_MODE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/df7/group__withdefaults.html#gafb1af1e519d77c793af539d8d34c27ce">ncdflt_get_supported</a> ()</td></tr>
<tr class="memdesc:gafb1af1e519d77c793af539d8d34c27ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get ORed value containing currently supported with-defaults modes.  <a href="#gafb1af1e519d77c793af539d8d34c27ce"></a><br/></td></tr>
<tr class="memitem:gaaa00b95c82c5bff5374540b31c6edc1e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/df7/group__withdefaults.html#gaaa00b95c82c5bff5374540b31c6edc1e">ncdflt_rpc_withdefaults</a> (<a class="el" href="../../db/de9/group__rpc.html#gab21d1d39737065c552f2ccc5b4819262">nc_rpc</a> *rpc, <a class="el" href="../../da/dbe/with__defaults_8h.html#ac70bef25cced39f6bab2ca5623ac57d9">NCDFLT_MODE</a> mode)</td></tr>
<tr class="memdesc:gaaa00b95c82c5bff5374540b31c6edc1e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set &lt;with-defaults&gt; parameter for the given NETCONF RPC message.  <a href="#gaaa00b95c82c5bff5374540b31c6edc1e"></a><br/></td></tr>
<tr class="memitem:ga832290f05e7a581e480507b4b3b6adf3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../da/dbe/with__defaults_8h.html#ac70bef25cced39f6bab2ca5623ac57d9">NCDFLT_MODE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/df7/group__withdefaults.html#ga832290f05e7a581e480507b4b3b6adf3">ncdflt_rpc_get_withdefaults</a> (const <a class="el" href="../../db/de9/group__rpc.html#gab21d1d39737065c552f2ccc5b4819262">nc_rpc</a> *rpc)</td></tr>
<tr class="memdesc:ga832290f05e7a581e480507b4b3b6adf3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get value of the &lt;with-defaults&gt; element from the rpc message.  <a href="#ga832290f05e7a581e480507b4b3b6adf3"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<p>libnetconf's implementation of NETCONF with-defaults capability as defined in RFC 6243. </p>
<hr/><h2>Macro Definition Documentation</h2>
<a class="anchor" id="ga2f7ad46580c9d311a31ed090baa7e22e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="../../d1/df7/group__withdefaults.html#ga2f7ad46580c9d311a31ed090baa7e22e">NCDFLT_DISABLE</a>&#160;&#160;&#160;<a class="el" href="../../d1/df7/group__withdefaults.html#ga09827f8096ddbf28bf4955254299cbed">ncdflt_set_basic_mode</a>(<a class="el" href="../../da/dbe/with__defaults_8h.html#ac70bef25cced39f6bab2ca5623ac57d9a0d81a2784281ceef0b6f2cef0dc7a41a">NCDFLT_MODE_DISABLED</a>)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Disable support for with-defaults capability. This can be done on both client and server. </p>
<p>This is alternative for ncdflt_set_basic_mode(NCDFLT_MODE_DISABLED). To enable with-defaults capability, use <a class="el" href="../../d1/df7/group__withdefaults.html#ga09827f8096ddbf28bf4955254299cbed" title="Set basic mode of the with-defaults capability for the NETCONF server.">ncdflt_set_basic_mode()</a> to set with-defaults' basic mode. </p>

<p>Definition at line <a class="el" href="../../da/dbe/with__defaults_8h_source.html#l00080">80</a> of file <a class="el" href="../../da/dbe/with__defaults_8h_source.html">with_defaults.h</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga09827f8096ddbf28bf4955254299cbed"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="../../d1/df7/group__withdefaults.html#ga09827f8096ddbf28bf4955254299cbed">ncdflt_set_basic_mode</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../da/dbe/with__defaults_8h.html#ac70bef25cced39f6bab2ca5623ac57d9">NCDFLT_MODE</a>&#160;</td>
          <td class="paramname"><em>mode</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set basic mode of the with-defaults capability for the NETCONF server. </p>
<p>Default basic mode used by libnetconf is 'explicit'. This function should be used before establishing a NETCONF session and settle common set of capabilities between client and server.</p>
<p>On the client side, this function doesn't have effect of setting up the specific mode. It only disables (NCDFLT_MODE_DISABLED) or enables (any other valid value) support for the with-defaults capability.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">mode</td><td>One of the with-defaults capability basic modes, NCDFLT_MODE_ALL_TAGGED is not a basic mode and such value is ignored. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaf5b02a59944cda3cc65859f67df4a0f6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../da/dbe/with__defaults_8h.html#ac70bef25cced39f6bab2ca5623ac57d9">NCDFLT_MODE</a> <a class="el" href="../../d1/df7/group__withdefaults.html#gaf5b02a59944cda3cc65859f67df4a0f6">ncdflt_get_basic_mode</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get current set basic mode of the with-defaults capability. </p>
<dl class="section return"><dt>Returns:</dt><dd>Current value of the with-defaults' basic mode. </dd></dl>

</div>
</div>
<a class="anchor" id="gaef1d4d6cb1a0b212ffe88cca68e97a21"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="../../d1/df7/group__withdefaults.html#gaef1d4d6cb1a0b212ffe88cca68e97a21">ncdflt_set_supported</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../da/dbe/with__defaults_8h.html#ac70bef25cced39f6bab2ca5623ac57d9">NCDFLT_MODE</a>&#160;</td>
          <td class="paramname"><em>modes</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set with-defaults modes that are supported. </p>
<p>This function should be used before establishing a NETCONF session and settle common set of capabilities between client and server. On the client side, this function has no effect.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">modes</td><td>ORed set of supported NCDFLT_MODE modes. Basic mode is always supported automatically. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gafb1af1e519d77c793af539d8d34c27ce"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../da/dbe/with__defaults_8h.html#ac70bef25cced39f6bab2ca5623ac57d9">NCDFLT_MODE</a> <a class="el" href="../../d1/df7/group__withdefaults.html#gafb1af1e519d77c793af539d8d34c27ce">ncdflt_get_supported</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get ORed value containing currently supported with-defaults modes. </p>
<dl class="section return"><dt>Returns:</dt><dd>ORed value containing currently supported with-defaults modes. </dd></dl>

</div>
</div>
<a class="anchor" id="gaaa00b95c82c5bff5374540b31c6edc1e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="../../d1/df7/group__withdefaults.html#gaaa00b95c82c5bff5374540b31c6edc1e">ncdflt_rpc_withdefaults</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../db/de9/group__rpc.html#gab21d1d39737065c552f2ccc5b4819262">nc_rpc</a> *&#160;</td>
          <td class="paramname"><em>rpc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../da/dbe/with__defaults_8h.html#ac70bef25cced39f6bab2ca5623ac57d9">NCDFLT_MODE</a>&#160;</td>
          <td class="paramname"><em>mode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set &lt;with-defaults&gt; parameter for the given NETCONF RPC message. </p>
<p>Sending RPC message withe set &lt;with-default&gt; parameter via the session which doesn't support specified value or with-defaults capability at all will fail.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">rpc</td><td>RPC message where &lt;with-defaults&gt; will be added. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">mode</td><td>Value for the &lt;with-defaults&gt; parameter, NCDFLT_MODE_DISABLED has no effect. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>0 on success, non-zero else. </dd></dl>

</div>
</div>
<a class="anchor" id="ga832290f05e7a581e480507b4b3b6adf3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../da/dbe/with__defaults_8h.html#ac70bef25cced39f6bab2ca5623ac57d9">NCDFLT_MODE</a> <a class="el" href="../../d1/df7/group__withdefaults.html#ga832290f05e7a581e480507b4b3b6adf3">ncdflt_rpc_get_withdefaults</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../db/de9/group__rpc.html#gab21d1d39737065c552f2ccc5b4819262">nc_rpc</a> *&#160;</td>
          <td class="paramname"><em>rpc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get value of the &lt;with-defaults&gt; element from the rpc message. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">rpc</td><td>RPC message to be parsed. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>with-defaults mode of the NETCONF rpc message. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>

    <li class="footer">Generated on Fri Aug 3 2012 08:25:37 for libnetconf by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.0-20120409 </li>
   </ul>
 </div>


</body>
</html>
